package net.simflow.swf.analyzer.network.stats.opt;

import java.util.HashSet;

import net.simflow.swf.analyzer.network.data.Flow;
import net.simflow.swf.analyzer.network.data.Network;
import net.simflow.swf.analyzer.network.data.Node;
import net.simflow.swf.analyzer.network.data.Service;

public class NetworkBasicAnalyzer {

	private static NetworkBasicAnalyzer instance = new NetworkBasicAnalyzer();

	private NetworkBasicAnalyzer() {
	}

	public static NetworkBasicAnalyzer getInstance() {
		return instance;
	}

	public String analyzeNetworkName(Network network) {
		return (network != null) ? network.getName() : null;
	}

	public HashSet<Flow> analyzeFlow(Network network) {
		return (network != null) ? new HashSet<Flow>(network.getFlowMap()
				.values()) : null;
	}

	public HashSet<Service> analyzeService(Network network) {
		return (network != null) ? new HashSet<Service>(network.getServiceMap()
				.values()) : null;
	}

	public HashSet<Node> analyzeNode(Network network) {
		return (network != null) ? new HashSet<Node>(network.getNodeSet())
				: null;
	}
}
